package com.mall.user.dto;

import com.mall.commons.result.AbstractRequest;
import com.mall.commons.tool.exception.ValidateException;
import com.mall.user.constants.SysRetCodeConstants;
import lombok.Data;

/**
 * @program: cs-mall_35th
 * @description:
 * @author: Weiwei Liu
 * @create: 2021-12-12 14:15
 **/
@Data
public class UpdateUserVerifyRequest extends AbstractRequest {

    private Long id;
    private String username;
    private String uuid;
    private String isVerify;
    private String isExpire;


    @Override
    public void requestCheck() {
        if (id == null && username == null && uuid == null) {
            //  至少要有一个作为查询更新依据
            throw new ValidateException(
                    SysRetCodeConstants. REQUISITE_PARAMETER_NOT_EXIST.getCode(),
                    SysRetCodeConstants. REQUISITE_PARAMETER_NOT_EXIST.getMessage());
        }

    }
}
